@import "ui-variables";

@icon-padding: 5px;
@icon-width: 16px;
@icon-height: 16px;
@status-bar-height: 20px;
@inactive-opacity: 0.5;

.terminal-plus {
  letter-spacing: normal;
  position: inherit;

  ul {
    padding: 0;
    margin: 0;
  }
  .icon::before {
    margin: 0;
    padding: 0;

  }
  .icon-x::before {
    content: '\f081' !important;
    line-height: normal;
  }

  &.terminal-view {
    display: -webkit-flex;
    flex-direction: column;
    align-items: center;
    flex-wrap: nowrap;

    .panel-divider {
      order: 1;
      display: inherit;

      flex: 0 0 auto;
      position: absolute;
      height: 8px;
      margin-top: -4px;

      z-index: 3;
      -webkit-user-select: none;
      cursor: ns-resize;
      width: 100%;
    }

    .btn-toolbar {
      order: 2;
      flex: 0 0 auto;
      width: 100%;
      padding: 4px 2px 4px 2px;

      .left {
        float: left;
      }
      .right {
        float: right;
      }

      .btn {
        top: 0;
        height: auto;
        line-height: normal;
        padding: 0;
        margin: 0 5px;
      }
    }

    .xterm {
      display: -webkit-flex;
      order: 3;
      flex: 1;
      width: 100%;
      height: 0px;
      padding: 0 5px;

      > .terminal {
        display: -webkit-flex;

        flex-direction: column;
        align-content: flex-end;
        position: relative;

        width: 100%;
        overflow: hidden;
        > div {
          flex: 1 0 auto;
          white-space: nowrap;
          font-size: inherit;
          > span {
            display: inline-block;
            line-height: inherit;
            height: inherit;
          }
        }
      }
    }

    .cursor-blink {
      .terminal-cursor {
        -webkit-animation: blink 1s step-start 0s infinite;
        -webkit-animation-delay: 1s;
        @-webkit-keyframes blink {
          50%  { background: transparent; }
        }
      }
    }
  }

  &.status-bar {
    display: -webkit-flex;
    flex-direction: row;
    align-items: center;
    -webkit-user-select: none;
    margin: 0 10px;
    box-sizing: content-box;
    height: @status-bar-height;

    i {
      cursor: pointer;
      display: inherit;
      text-align: center;
      align-self: center;
      line-height: @status-bar-height;
    }
    .icon-x {
      color: red;
      justify-content: flex-end;
    }

    .status-container {
      display: inherit;
      position: relative;
      width: 100%;
      height: 100%;
      line-height: @status-bar-height;
      margin: 0 @icon-padding;

      .status-icon {
        display: inherit;
        cursor: pointer;
        -webkit-transition: opacity 0.25s ease-in-out, color 0.5s ease-in-out;
        -webkit-user-drag: element;
        padding: 0 @icon-padding;
        opacity: @inactive-opacity;
        height: 100%;
        &.active {
          opacity: 1;
        }
      }

      .is-dragging {
        border-bottom: 1px solid @background-color-info;
      }

      .placeholder {
        pointer-events: none;
        position: absolute;
        top: -@icon-height;
        color: @background-color-info;
        z-index: 999;
        margin: 0 -6px;
        padding: 0;
        height: 10px;
        line-height: 10px;

        &::before {
          font-size: 16px;
          font-family: 'Octicons Regular';
          font-weight: normal;
          font-style: normal;
          display: inline-block;
          -webkit-font-smoothing: antialiased;
          text-decoration: none;
          content: "\f05b";
        }
      }

        // &:after {
        //   font-family: 'Octicons Regular';
        //   font-weight: normal;
        //   font-style: normal;
        //   -webkit-font-smoothing: antialiased;
        //   text-decoration: none;
        //   font-size: 16px;
        //   line-height: 8px;
        //   content: "\f05b";
        // }
    }
  }

  .inserted {
    -webkit-animation: flash 0.25s linear 6 alternate;
  }
  @-webkit-keyframes flash {
    0% {
      opacity: @inactive-opacity;
    }
    100% {
      opacity: 1;
    }
  }
}
